/*
 * Copyright (c) 2019-2020, https://api.iot.10086.cn/(https://gitee.com/cmcc-iot-api/iot-card-open-application/).
 */
package cn.iot.card.open.sim.dto.siminfo;

import cn.iot.card.open.constants.Constants;

/**
 * 群组成员语音白名单管理请求接收类
 *
 * @author zhanlele
 * @date 20200315 22:04:00
 * @modify 20200315 zhanlele v1.1.2 创建
 * @since v1.1.2
 */
public class ManagerGroupVoiceWhiteDTO {
    /**
     * cardType 卡类型
     */
    private String cardType;
    /**
     * cardNum 卡号
     */
    private String cardNum;
    /**
     * groupId 群组ID
     */
    private String groupId;
    /**
     * operType 操作类型
     */
    private String operType;
    /**
     * whiteNumber 白名单号码
     */
    private String whiteNumber;

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    public String getWhiteNumber() {
        return whiteNumber;
    }

    public void setWhiteNumber(String whiteNumber) {
        this.whiteNumber = whiteNumber;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        switch (cardType) {
            case Constants.REQUEST_PARAM_MSISDN:
                stringBuilder.append("所查询的物联卡号码(MSISDN):").append(cardNum).append(",");
                break;
            case Constants.REQUEST_PARAM_ICCID:
                stringBuilder.append("集成电路卡识别码(ICCID):").append(cardNum).append(",");
                break;
            case Constants.REQUEST_PARAM_IMSI:
                stringBuilder.append("国际移动用户识别码(IMSI):").append(cardNum).append(",");
                break;
        }
        stringBuilder.append("成员归属的群组ID:").append(groupId).append(",");
        if ("1".equals(operType)) {
            stringBuilder.append("语音白名单配置类型:").append("新增").append(",");
        } else if ("4".equals(operType)) {
            stringBuilder.append("语音白名单配置类型:").append("删除").append(",");
        }
        stringBuilder.append("成员配置的语音白名单号码（MSISDN）:").append("whiteNumber");
        return stringBuilder.toString();
    }
}
